export default{
  data(){
    return{
      tableData: [],
      columnsData: [],
      pagination: {
        current: 1,
        page_size: 8,
        total: 0,
        show_total:true

      },
      tableSelection: []
    }
  },
  methods:{
    setPageData(result) {
      let data = result.data;
      this.pagination.total = data.total;
      this.tableData = data.page;
    },
    setColumnsData(columes) {
      this.columnsData = columes;
    },
    handleCurrentChange(currentPage) {
      this.pagination.current = currentPage;
    },
    getSelectIdList(refTableName){
      let selectIdList = [];
      let selectOption = this.$refs[refTableName].getSelection();
      for(let i=0;i<selectOption.length;i++){
        selectIdList.push(selectOption[i].id);
      }
      return selectIdList;
    }
  }
}
